﻿using System.Windows;

namespace WPF_PasswordBox;

/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();
        this.DataContext = this;
    }


    public static readonly DependencyProperty MyPasswordVmProperty = DependencyProperty.Register(
        nameof(MyPasswordVm), typeof(String), typeof(MainWindow));
    // , new PropertyMetadata(default(String))

    public String MyPasswordVm
    {
        get { return (String)GetValue(MyPasswordVmProperty); }
        set { SetValue(MyPasswordVmProperty, value); }
    }

    private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
    {
        MyPasswordVm = DateTime.Now.ToString("HH:mm:ss.ffff");
    }
}